Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc/cores/video: fix framebuffer color output #1448

Merged
merged 1 commit into from Oct 30, 2022

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Oct 1, 2022

An earlier patch fixed the swapped red and blue channels on the HDMI PHYs. This exposed the fact that the framebuffer readout was swapped too.

The framebuffer readout is fixed by this patch to match the r5g6b5 and a8b8g8r8 color format definitions documented in the Linux kernel's simplefb driver and used by LiteX:
https://www.kernel.org/doc/Documentation/devicetree/bindings/display/simple-framebuffer.txt

This has been tested using 16 bit SDRAM in both supported color formats.

Additionally the green color used by the video terminal is swapped. It now matches the color used by LiteX on Ubuntu's terminal, from which it was probably originally sourced.

An earlier patch fixed the swapped red and blue channels on the HDMI
PHYs. This exposed the fact that the framebuffer readout was swapped
too.

The framebuffer readout is fixed by this patch to match the r5g6b5 and
a8b8g8r8 color format definitions documented in the Linux kernel's
simplefb driver and used by LiteX:
https://www.kernel.org/doc/Documentation/devicetree/bindings/display/simple-framebuffer.txt

This has been tested using 16 bit SDRAM in both supported color formats.

Additionally the green color used by the video terminal is swapped. It
now matches the color used by LiteX on Ubuntu's terminal, from which it
was probably originally sourced.
@enjoy-digital
Copy link
Owner

Thanks @tpwrules, this should be good, but I'll do a test on hardware. (Since this could also be dependent of the DRAM configuration).

@enjoy-digital enjoy-digital merged commit c71db51 into enjoy-digital:master Oct 30, 2022
@tpwrules tpwrules deleted the fix-framebuffer-colors branch October 30, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants